define(["jquery", "easy-admin"], function ($, ea) {
    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'supplier.OrderShipmentList/index',

        export_url: 'supplier.OrderShipmentList/export',
        import_url: 'supplier.OrderShipmentList/import',

        batch_shipment: 'supplier.OrderShipmentList/batch_shipment',
        batch_export: 'supplier.OrderShipmentList/batch_export',
        batch_take_order: 'supplier.OrderShipmentList/batch_take_order',
        batch_discard_order: 'supplier.OrderShipmentList/batch_discard_order',

        detail: 'supplier.OrderShipmentList/detail',
        distribute: 'supplier.OrderShipmentList/distribute',
        cancel: 'supplier.OrderShipmentList/cancel',
        get: 'supplier.OrderShipmentList/get_order',

    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,

                toolbar: ['refresh',],
                height: 750,
                cols: [[
                    {type: 'checkbox'},
                    {field: 'bn', title: '编号', minWidth: 80},

                    {field: 'supplier.name', title: '供应商名称'},
                    {field: 'supplier.address', title: '供应商地址'},
                    {field: 'supplier.linkman', title: '供应商联系人'},
                    {field: 'company_name', title: '收货公司名称'},
                    {field: 'company_address', title: '收货地址'},
                    {field: 'company_receiver', title: '收货单位联系人'},
                    {field: 'create_time', title: '出货日期',sort:true},

                    {
                        title: '操作',
                        templet: '#barDemo',
                    }

                ]],
                customDefaultToolbar: true,
                defaultToolbar: [],


            });
            ea.listen();
            // ea.table.showSearch(true);
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },

        detail: function () {
            ea.listen();
        },
        get_order: function () {

            ea.listen();
        },
        get_list: function () {

            ea.listen();
        },
        cancel: function () {
            ea.listen();
        },


    };
    return Controller;
});